<!-- 首页 -->
<div class="tab-content active" id="home">
    <header class="page-header">
        <h2>欢迎使用 CCloud AI 智能体</h2>
        <p>基于 Claude Code 的强大 AI 助手桌面应用</p>

        <!-- 状态信息栏 -->
        <div class="header-status-bar">
            <div class="status-info-item">
                <i class="fas fa-tag"></i>
                <span class="status-label">Claude Code:</span>
                <span class="status-value" id="header-claude-version">检测中...</span>
            </div>
            <div class="status-info-item clickable" onclick="switchTab('setup')" title="点击配置API Key">
                <i class="fas fa-key"></i>
                <span class="status-label">API Key:</span>
                <span class="status-value" id="header-api-status">未配置</span>
                <div class="connection-indicator" id="api-connection-indicator">
                    <div class="status-dot" id="api-status-dot"></div>
                </div>
            </div>
            <!-- <button class="btn-clear-api" onclick="clearApiConfig(event)" title="清除API配置">
                <i class="fas fa-times-circle"></i>
            </button> -->
        </div>
    </header>

    <div class="welcome-cards">

        <!-- <div class="card">
            <div class="card-icon">
                <i class="fas fa-cogs"></i>
            </div>
            <h3>高级功能测试</h3>
            <p>测试多个任务执行，验证 Claude Code 的稳定性和性能</p>
            <button class="btn-secondary" onclick="testClaudeAdvanced()">
                <i class="fas fa-vial"></i>
                高级测试
            </button>
        </div> -->

        <div class="card">
            <div class="card-icon">
                <i class="fas fa-brain"></i>
            </div>
            <h3>智能任务</h3>
            <p>支持各种编程任务，让 AI 为你轻松完成</p>
            <button class="btn-primary" onclick="switchTab('tasks')">
                <i class="fas fa-code"></i>
                执行任务
            </button>
        </div>

        <!-- <div class="card">
            <div class="card-icon">
                <i class="fas fa-cog"></i>
            </div>
            <h3>设置配置</h3>
            <p>配置 API Key 和其他设置选项</p>
            <button class="btn-primary" onclick="switchTab('setup')">
                <i class="fas fa-settings"></i>
                进入设置
            </button>
        </div> -->

        <div class="card">
            <div class="card-icon">
                <i class="fas fa-history"></i>
            </div>
            <h3>历史记录</h3>
            <p>查看之前的任务执行记录和结果</p>
            <div class="card-actions">
                <button class="btn-primary" onclick="switchTab('history')">
                    <i class="fas fa-file-alt"></i>
                    查看历史
                </button>
                <!-- <button class="btn-danger-small" onclick="clearAllHistory()" title="清除所有历史记录">
                    <i class="fas fa-trash-alt"></i>
                </button> -->
            </div>
        </div>
    </div>

    <!-- 应用版本信息 -->
    <footer class="app-version-footer">
        <div class="footer-content">
            <small class="app-version-text">版本号：v alpha 1</small>

        </div>
    </footer>

</div>